/*
 * MIT License
 *
 * Copyright (c) 2018 Aberic Yang
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: ProtoDemo.proto

package cn.aberic.bother.entity.proto;

public final class ProtoDemo {
  private ProtoDemo() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface StudentOrBuilder extends
      // @@protoc_insertion_point(interface_extends:Student)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>int32 id = 1;</code>
     */
    int getId();

    /**
     * <code>string name = 2;</code>
     */
    String getName();
    /**
     * <code>string name = 2;</code>
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <code>string email = 3;</code>
     */
    String getEmail();
    /**
     * <code>string email = 3;</code>
     */
    com.google.protobuf.ByteString
        getEmailBytes();

    /**
     * <code>.Student.Sex sex = 4;</code>
     */
    int getSexValue();
    /**
     * <code>.Student.Sex sex = 4;</code>
     */
    ProtoDemo.Student.Sex getSex();

    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    java.util.List<Student.PhoneNumber>
        getPhoneList();
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    ProtoDemo.Student.PhoneNumber getPhone(int index);
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    int getPhoneCount();
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    java.util.List<? extends Student.PhoneNumberOrBuilder>
        getPhoneOrBuilderList();
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    ProtoDemo.Student.PhoneNumberOrBuilder getPhoneOrBuilder(
            int index);
  }
  /**
   * Protobuf type {@code Student}
   */
  public  static final class Student extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:Student)
      StudentOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Student.newBuilder() to construct.
    private Student(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Student() {
      id_ = 0;
      name_ = "";
      email_ = "";
      sex_ = 0;
      phone_ = java.util.Collections.emptyList();
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Student(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {

              id_ = input.readInt32();
              break;
            }
            case 18: {
              String s = input.readStringRequireUtf8();

              name_ = s;
              break;
            }
            case 26: {
              String s = input.readStringRequireUtf8();

              email_ = s;
              break;
            }
            case 32: {
              int rawValue = input.readEnum();

              sex_ = rawValue;
              break;
            }
            case 42: {
              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
                phone_ = new java.util.ArrayList<PhoneNumber>();
                mutable_bitField0_ |= 0x00000010;
              }
              phone_.add(
                  input.readMessage(ProtoDemo.Student.PhoneNumber.parser(), extensionRegistry));
              break;
            }
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
          phone_ = java.util.Collections.unmodifiableList(phone_);
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return ProtoDemo.internal_static_Student_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return ProtoDemo.internal_static_Student_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ProtoDemo.Student.class, ProtoDemo.Student.Builder.class);
    }

    /**
     * <pre>
     *枚举类
     * </pre>
     *
     * Protobuf enum {@code Student.Sex}
     */
    public enum Sex
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>MAN = 0;</code>
       */
      MAN(0),
      /**
       * <code>WOMAN = 1;</code>
       */
      WOMAN(1),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>MAN = 0;</code>
       */
      public static final int MAN_VALUE = 0;
      /**
       * <code>WOMAN = 1;</code>
       */
      public static final int WOMAN_VALUE = 1;


      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @Deprecated
      public static Sex valueOf(int value) {
        return forNumber(value);
      }

      public static Sex forNumber(int value) {
        switch (value) {
          case 0: return MAN;
          case 1: return WOMAN;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<Sex>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          Sex> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<Sex>() {
              public Sex findValueByNumber(int number) {
                return Sex.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return ProtoDemo.Student.getDescriptor().getEnumTypes().get(0);
      }

      private static final Sex[] VALUES = values();

      public static Sex valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private Sex(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:Student.Sex)
    }

    /**
     * Protobuf enum {@code Student.PhoneType}
     */
    public enum PhoneType
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>MOBILE = 0;</code>
       */
      MOBILE(0),
      /**
       * <code>HOME = 1;</code>
       */
      HOME(1),
      /**
       * <code>WORK = 2;</code>
       */
      WORK(2),
      UNRECOGNIZED(-1),
      ;

      /**
       * <code>MOBILE = 0;</code>
       */
      public static final int MOBILE_VALUE = 0;
      /**
       * <code>HOME = 1;</code>
       */
      public static final int HOME_VALUE = 1;
      /**
       * <code>WORK = 2;</code>
       */
      public static final int WORK_VALUE = 2;


      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @Deprecated
      public static PhoneType valueOf(int value) {
        return forNumber(value);
      }

      public static PhoneType forNumber(int value) {
        switch (value) {
          case 0: return MOBILE;
          case 1: return HOME;
          case 2: return WORK;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          PhoneType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
              public PhoneType findValueByNumber(int number) {
                return PhoneType.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return ProtoDemo.Student.getDescriptor().getEnumTypes().get(1);
      }

      private static final PhoneType[] VALUES = values();

      public static PhoneType valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private PhoneType(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:Student.PhoneType)
    }

    public interface PhoneNumberOrBuilder extends
        // @@protoc_insertion_point(interface_extends:Student.PhoneNumber)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <code>string number = 1;</code>
       */
      String getNumber();
      /**
       * <code>string number = 1;</code>
       */
      com.google.protobuf.ByteString
          getNumberBytes();

      /**
       * <code>.Student.PhoneType type = 2;</code>
       */
      int getTypeValue();
      /**
       * <code>.Student.PhoneType type = 2;</code>
       */
      ProtoDemo.Student.PhoneType getType();
    }
    /**
     * <pre>
     *内部类
     * </pre>
     *
     * Protobuf type {@code Student.PhoneNumber}
     */
    public  static final class PhoneNumber extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:Student.PhoneNumber)
        PhoneNumberOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use PhoneNumber.newBuilder() to construct.
      private PhoneNumber(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private PhoneNumber() {
        number_ = "";
        type_ = 0;
      }

      @Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private PhoneNumber(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                String s = input.readStringRequireUtf8();

                number_ = s;
                break;
              }
              case 16: {
                int rawValue = input.readEnum();

                type_ = rawValue;
                break;
              }
              default: {
                if (!parseUnknownFieldProto3(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ProtoDemo.internal_static_Student_PhoneNumber_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ProtoDemo.internal_static_Student_PhoneNumber_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ProtoDemo.Student.PhoneNumber.class, ProtoDemo.Student.PhoneNumber.Builder.class);
      }

      public static final int NUMBER_FIELD_NUMBER = 1;
      private volatile Object number_;
      /**
       * <code>string number = 1;</code>
       */
      public String getNumber() {
        Object ref = number_;
        if (ref instanceof String) {
          return (String) ref;
        } else {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          number_ = s;
          return s;
        }
      }
      /**
       * <code>string number = 1;</code>
       */
      public com.google.protobuf.ByteString
          getNumberBytes() {
        Object ref = number_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          number_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int TYPE_FIELD_NUMBER = 2;
      private int type_;
      /**
       * <code>.Student.PhoneType type = 2;</code>
       */
      public int getTypeValue() {
        return type_;
      }
      /**
       * <code>.Student.PhoneType type = 2;</code>
       */
      public ProtoDemo.Student.PhoneType getType() {
        @SuppressWarnings("deprecation")
        ProtoDemo.Student.PhoneType result = ProtoDemo.Student.PhoneType.valueOf(type_);
        return result == null ? ProtoDemo.Student.PhoneType.UNRECOGNIZED : result;
      }

      private byte memoizedIsInitialized = -1;
      @Override
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
      }

      @Override
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (!getNumberBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, number_);
        }
        if (type_ != ProtoDemo.Student.PhoneType.MOBILE.getNumber()) {
          output.writeEnum(2, type_);
        }
        unknownFields.writeTo(output);
      }

      @Override
      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (!getNumberBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, number_);
        }
        if (type_ != ProtoDemo.Student.PhoneType.MOBILE.getNumber()) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(2, type_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @Override
      public boolean equals(final Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof ProtoDemo.Student.PhoneNumber)) {
          return super.equals(obj);
        }
        ProtoDemo.Student.PhoneNumber other = (ProtoDemo.Student.PhoneNumber) obj;

        boolean result = true;
        result = result && getNumber()
            .equals(other.getNumber());
        result = result && type_ == other.type_;
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + NUMBER_FIELD_NUMBER;
        hash = (53 * hash) + getNumber().hashCode();
        hash = (37 * hash) + TYPE_FIELD_NUMBER;
        hash = (53 * hash) + type_;
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static ProtoDemo.Student.PhoneNumber parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }
      public static ProtoDemo.Student.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static ProtoDemo.Student.PhoneNumber parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static ProtoDemo.Student.PhoneNumber parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      @Override
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(ProtoDemo.Student.PhoneNumber prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      @Override
      public Builder toBuilder() {
        return this == DEFAULT_INSTANCE
            ? new Builder() : new Builder().mergeFrom(this);
      }

      @Override
      protected Builder newBuilderForType(
          BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
      }
      /**
       * <pre>
       *内部类
       * </pre>
       *
       * Protobuf type {@code Student.PhoneNumber}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:Student.PhoneNumber)
          ProtoDemo.Student.PhoneNumberOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return ProtoDemo.internal_static_Student_PhoneNumber_descriptor;
        }

        @Override
        protected FieldAccessorTable
            internalGetFieldAccessorTable() {
          return ProtoDemo.internal_static_Student_PhoneNumber_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  ProtoDemo.Student.PhoneNumber.class, ProtoDemo.Student.PhoneNumber.Builder.class);
        }

        // Construct using cn.aberic.bother.entity.proto.ProtoDemo.Student.PhoneNumber.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

        private Builder(
            BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @Override
        public Builder clear() {
          super.clear();
          number_ = "";

          type_ = 0;

          return this;
        }

        @Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return ProtoDemo.internal_static_Student_PhoneNumber_descriptor;
        }

        @Override
        public ProtoDemo.Student.PhoneNumber getDefaultInstanceForType() {
          return ProtoDemo.Student.PhoneNumber.getDefaultInstance();
        }

        @Override
        public ProtoDemo.Student.PhoneNumber build() {
          ProtoDemo.Student.PhoneNumber result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @Override
        public ProtoDemo.Student.PhoneNumber buildPartial() {
          ProtoDemo.Student.PhoneNumber result = new ProtoDemo.Student.PhoneNumber(this);
          result.number_ = number_;
          result.type_ = type_;
          onBuilt();
          return result;
        }

        @Override
        public Builder clone() {
          return (Builder) super.clone();
        }
        @Override
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            Object value) {
          return (Builder) super.setField(field, value);
        }
        @Override
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return (Builder) super.clearField(field);
        }
        @Override
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return (Builder) super.clearOneof(oneof);
        }
        @Override
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        @Override
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        @Override
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof ProtoDemo.Student.PhoneNumber) {
            return mergeFrom((ProtoDemo.Student.PhoneNumber)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(ProtoDemo.Student.PhoneNumber other) {
          if (other == ProtoDemo.Student.PhoneNumber.getDefaultInstance()) return this;
          if (!other.getNumber().isEmpty()) {
            number_ = other.number_;
            onChanged();
          }
          if (other.type_ != 0) {
            setTypeValue(other.getTypeValue());
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

        @Override
        public final boolean isInitialized() {
          return true;
        }

        @Override
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          ProtoDemo.Student.PhoneNumber parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (ProtoDemo.Student.PhoneNumber) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private Object number_ = "";
        /**
         * <code>string number = 1;</code>
         */
        public String getNumber() {
          Object ref = number_;
          if (!(ref instanceof String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            number_ = s;
            return s;
          } else {
            return (String) ref;
          }
        }
        /**
         * <code>string number = 1;</code>
         */
        public com.google.protobuf.ByteString
            getNumberBytes() {
          Object ref = number_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8(
                    (String) ref);
            number_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <code>string number = 1;</code>
         */
        public Builder setNumber(
            String value) {
          if (value == null) {
    throw new NullPointerException();
  }

          number_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>string number = 1;</code>
         */
        public Builder clearNumber() {

          number_ = getDefaultInstance().getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>string number = 1;</code>
         */
        public Builder setNumberBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

          number_ = value;
          onChanged();
          return this;
        }

        private int type_ = 0;
        /**
         * <code>.Student.PhoneType type = 2;</code>
         */
        public int getTypeValue() {
          return type_;
        }
        /**
         * <code>.Student.PhoneType type = 2;</code>
         */
        public Builder setTypeValue(int value) {
          type_ = value;
          onChanged();
          return this;
        }
        /**
         * <code>.Student.PhoneType type = 2;</code>
         */
        public ProtoDemo.Student.PhoneType getType() {
          @SuppressWarnings("deprecation")
          ProtoDemo.Student.PhoneType result = ProtoDemo.Student.PhoneType.valueOf(type_);
          return result == null ? ProtoDemo.Student.PhoneType.UNRECOGNIZED : result;
        }
        /**
         * <code>.Student.PhoneType type = 2;</code>
         */
        public Builder setType(ProtoDemo.Student.PhoneType value) {
          if (value == null) {
            throw new NullPointerException();
          }

          type_ = value.getNumber();
          onChanged();
          return this;
        }
        /**
         * <code>.Student.PhoneType type = 2;</code>
         */
        public Builder clearType() {

          type_ = 0;
          onChanged();
          return this;
        }
        @Override
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFieldsProto3(unknownFields);
        }

        @Override
        public final Builder mergeUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:Student.PhoneNumber)
      }

      // @@protoc_insertion_point(class_scope:Student.PhoneNumber)
      private static final ProtoDemo.Student.PhoneNumber DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new ProtoDemo.Student.PhoneNumber();
      }

      public static ProtoDemo.Student.PhoneNumber getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static final com.google.protobuf.Parser<PhoneNumber>
          PARSER = new com.google.protobuf.AbstractParser<PhoneNumber>() {
        @Override
        public PhoneNumber parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new PhoneNumber(input, extensionRegistry);
        }
      };

      public static com.google.protobuf.Parser<PhoneNumber> parser() {
        return PARSER;
      }

      @Override
      public com.google.protobuf.Parser<PhoneNumber> getParserForType() {
        return PARSER;
      }

      @Override
      public ProtoDemo.Student.PhoneNumber getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int ID_FIELD_NUMBER = 1;
    private int id_;
    /**
     * <code>int32 id = 1;</code>
     */
    public int getId() {
      return id_;
    }

    public static final int NAME_FIELD_NUMBER = 2;
    private volatile Object name_;
    /**
     * <code>string name = 2;</code>
     */
    public String getName() {
      Object ref = name_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }
    /**
     * <code>string name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int EMAIL_FIELD_NUMBER = 3;
    private volatile Object email_;
    /**
     * <code>string email = 3;</code>
     */
    public String getEmail() {
      Object ref = email_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        email_ = s;
        return s;
      }
    }
    /**
     * <code>string email = 3;</code>
     */
    public com.google.protobuf.ByteString
        getEmailBytes() {
      Object ref = email_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        email_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int SEX_FIELD_NUMBER = 4;
    private int sex_;
    /**
     * <code>.Student.Sex sex = 4;</code>
     */
    public int getSexValue() {
      return sex_;
    }
    /**
     * <code>.Student.Sex sex = 4;</code>
     */
    public ProtoDemo.Student.Sex getSex() {
      @SuppressWarnings("deprecation")
      ProtoDemo.Student.Sex result = ProtoDemo.Student.Sex.valueOf(sex_);
      return result == null ? ProtoDemo.Student.Sex.UNRECOGNIZED : result;
    }

    public static final int PHONE_FIELD_NUMBER = 5;
    private java.util.List<PhoneNumber> phone_;
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    public java.util.List<PhoneNumber> getPhoneList() {
      return phone_;
    }
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    public java.util.List<? extends PhoneNumberOrBuilder>
        getPhoneOrBuilderList() {
      return phone_;
    }
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    public int getPhoneCount() {
      return phone_.size();
    }
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    public ProtoDemo.Student.PhoneNumber getPhone(int index) {
      return phone_.get(index);
    }
    /**
     * <pre>
     *集合
     * </pre>
     *
     * <code>repeated .Student.PhoneNumber phone = 5;</code>
     */
    public ProtoDemo.Student.PhoneNumberOrBuilder getPhoneOrBuilder(
        int index) {
      return phone_.get(index);
    }

    private byte memoizedIsInitialized = -1;
    @Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (id_ != 0) {
        output.writeInt32(1, id_);
      }
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
      }
      if (!getEmailBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_);
      }
      if (sex_ != ProtoDemo.Student.Sex.MAN.getNumber()) {
        output.writeEnum(4, sex_);
      }
      for (int i = 0; i < phone_.size(); i++) {
        output.writeMessage(5, phone_.get(i));
      }
      unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (id_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, id_);
      }
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
      }
      if (!getEmailBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_);
      }
      if (sex_ != ProtoDemo.Student.Sex.MAN.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(4, sex_);
      }
      for (int i = 0; i < phone_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, phone_.get(i));
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof ProtoDemo.Student)) {
        return super.equals(obj);
      }
      ProtoDemo.Student other = (ProtoDemo.Student) obj;

      boolean result = true;
      result = result && (getId()
          == other.getId());
      result = result && getName()
          .equals(other.getName());
      result = result && getEmail()
          .equals(other.getEmail());
      result = result && sex_ == other.sex_;
      result = result && getPhoneList()
          .equals(other.getPhoneList());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId();
      hash = (37 * hash) + NAME_FIELD_NUMBER;
      hash = (53 * hash) + getName().hashCode();
      hash = (37 * hash) + EMAIL_FIELD_NUMBER;
      hash = (53 * hash) + getEmail().hashCode();
      hash = (37 * hash) + SEX_FIELD_NUMBER;
      hash = (53 * hash) + sex_;
      if (getPhoneCount() > 0) {
        hash = (37 * hash) + PHONE_FIELD_NUMBER;
        hash = (53 * hash) + getPhoneList().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static ProtoDemo.Student parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ProtoDemo.Student parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ProtoDemo.Student parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ProtoDemo.Student parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ProtoDemo.Student parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static ProtoDemo.Student parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static ProtoDemo.Student parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static ProtoDemo.Student parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static ProtoDemo.Student parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static ProtoDemo.Student parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static ProtoDemo.Student parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static ProtoDemo.Student parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(ProtoDemo.Student prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code Student}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:Student)
        ProtoDemo.StudentOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return ProtoDemo.internal_static_Student_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return ProtoDemo.internal_static_Student_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                ProtoDemo.Student.class, ProtoDemo.Student.Builder.class);
      }

      // Construct using cn.aberic.bother.entity.proto.ProtoDemo.Student.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getPhoneFieldBuilder();
        }
      }
      @Override
      public Builder clear() {
        super.clear();
        id_ = 0;

        name_ = "";

        email_ = "";

        sex_ = 0;

        if (phoneBuilder_ == null) {
          phone_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          phoneBuilder_.clear();
        }
        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return ProtoDemo.internal_static_Student_descriptor;
      }

      @Override
      public ProtoDemo.Student getDefaultInstanceForType() {
        return ProtoDemo.Student.getDefaultInstance();
      }

      @Override
      public ProtoDemo.Student build() {
        ProtoDemo.Student result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public ProtoDemo.Student buildPartial() {
        ProtoDemo.Student result = new ProtoDemo.Student(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        result.id_ = id_;
        result.name_ = name_;
        result.email_ = email_;
        result.sex_ = sex_;
        if (phoneBuilder_ == null) {
          if (((bitField0_ & 0x00000010) == 0x00000010)) {
            phone_ = java.util.Collections.unmodifiableList(phone_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.phone_ = phone_;
        } else {
          result.phone_ = phoneBuilder_.build();
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @Override
      public Builder clone() {
        return (Builder) super.clone();
      }
      @Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.setField(field, value);
      }
      @Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      @Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      @Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      @Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      @Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof ProtoDemo.Student) {
          return mergeFrom((ProtoDemo.Student)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(ProtoDemo.Student other) {
        if (other == ProtoDemo.Student.getDefaultInstance()) return this;
        if (other.getId() != 0) {
          setId(other.getId());
        }
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (!other.getEmail().isEmpty()) {
          email_ = other.email_;
          onChanged();
        }
        if (other.sex_ != 0) {
          setSexValue(other.getSexValue());
        }
        if (phoneBuilder_ == null) {
          if (!other.phone_.isEmpty()) {
            if (phone_.isEmpty()) {
              phone_ = other.phone_;
              bitField0_ = (bitField0_ & ~0x00000010);
            } else {
              ensurePhoneIsMutable();
              phone_.addAll(other.phone_);
            }
            onChanged();
          }
        } else {
          if (!other.phone_.isEmpty()) {
            if (phoneBuilder_.isEmpty()) {
              phoneBuilder_.dispose();
              phoneBuilder_ = null;
              phone_ = other.phone_;
              bitField0_ = (bitField0_ & ~0x00000010);
              phoneBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                   getPhoneFieldBuilder() : null;
            } else {
              phoneBuilder_.addAllMessages(other.phone_);
            }
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      @Override
      public final boolean isInitialized() {
        return true;
      }

      @Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        ProtoDemo.Student parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (ProtoDemo.Student) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int id_ ;
      /**
       * <code>int32 id = 1;</code>
       */
      public int getId() {
        return id_;
      }
      /**
       * <code>int32 id = 1;</code>
       */
      public Builder setId(int value) {

        id_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 id = 1;</code>
       */
      public Builder clearId() {

        id_ = 0;
        onChanged();
        return this;
      }

      private Object name_ = "";
      /**
       * <code>string name = 2;</code>
       */
      public String getName() {
        Object ref = name_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string name = 2;</code>
       */
      public com.google.protobuf.ByteString
          getNameBytes() {
        Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string name = 2;</code>
       */
      public Builder setName(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }

        name_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string name = 2;</code>
       */
      public Builder clearName() {

        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <code>string name = 2;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

        name_ = value;
        onChanged();
        return this;
      }

      private Object email_ = "";
      /**
       * <code>string email = 3;</code>
       */
      public String getEmail() {
        Object ref = email_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          email_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string email = 3;</code>
       */
      public com.google.protobuf.ByteString
          getEmailBytes() {
        Object ref = email_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          email_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string email = 3;</code>
       */
      public Builder setEmail(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }

        email_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string email = 3;</code>
       */
      public Builder clearEmail() {

        email_ = getDefaultInstance().getEmail();
        onChanged();
        return this;
      }
      /**
       * <code>string email = 3;</code>
       */
      public Builder setEmailBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

        email_ = value;
        onChanged();
        return this;
      }

      private int sex_ = 0;
      /**
       * <code>.Student.Sex sex = 4;</code>
       */
      public int getSexValue() {
        return sex_;
      }
      /**
       * <code>.Student.Sex sex = 4;</code>
       */
      public Builder setSexValue(int value) {
        sex_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.Student.Sex sex = 4;</code>
       */
      public ProtoDemo.Student.Sex getSex() {
        @SuppressWarnings("deprecation")
        ProtoDemo.Student.Sex result = ProtoDemo.Student.Sex.valueOf(sex_);
        return result == null ? ProtoDemo.Student.Sex.UNRECOGNIZED : result;
      }
      /**
       * <code>.Student.Sex sex = 4;</code>
       */
      public Builder setSex(ProtoDemo.Student.Sex value) {
        if (value == null) {
          throw new NullPointerException();
        }

        sex_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.Student.Sex sex = 4;</code>
       */
      public Builder clearSex() {

        sex_ = 0;
        onChanged();
        return this;
      }

      private java.util.List<PhoneNumber> phone_ =
        java.util.Collections.emptyList();
      private void ensurePhoneIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          phone_ = new java.util.ArrayList<PhoneNumber>(phone_);
          bitField0_ |= 0x00000010;
         }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
          PhoneNumber, PhoneNumber.Builder, PhoneNumberOrBuilder> phoneBuilder_;

      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public java.util.List<PhoneNumber> getPhoneList() {
        if (phoneBuilder_ == null) {
          return java.util.Collections.unmodifiableList(phone_);
        } else {
          return phoneBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public int getPhoneCount() {
        if (phoneBuilder_ == null) {
          return phone_.size();
        } else {
          return phoneBuilder_.getCount();
        }
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public ProtoDemo.Student.PhoneNumber getPhone(int index) {
        if (phoneBuilder_ == null) {
          return phone_.get(index);
        } else {
          return phoneBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder setPhone(
          int index, ProtoDemo.Student.PhoneNumber value) {
        if (phoneBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePhoneIsMutable();
          phone_.set(index, value);
          onChanged();
        } else {
          phoneBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder setPhone(
          int index, ProtoDemo.Student.PhoneNumber.Builder builderForValue) {
        if (phoneBuilder_ == null) {
          ensurePhoneIsMutable();
          phone_.set(index, builderForValue.build());
          onChanged();
        } else {
          phoneBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder addPhone(ProtoDemo.Student.PhoneNumber value) {
        if (phoneBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePhoneIsMutable();
          phone_.add(value);
          onChanged();
        } else {
          phoneBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder addPhone(
          int index, ProtoDemo.Student.PhoneNumber value) {
        if (phoneBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePhoneIsMutable();
          phone_.add(index, value);
          onChanged();
        } else {
          phoneBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder addPhone(
          ProtoDemo.Student.PhoneNumber.Builder builderForValue) {
        if (phoneBuilder_ == null) {
          ensurePhoneIsMutable();
          phone_.add(builderForValue.build());
          onChanged();
        } else {
          phoneBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder addPhone(
          int index, ProtoDemo.Student.PhoneNumber.Builder builderForValue) {
        if (phoneBuilder_ == null) {
          ensurePhoneIsMutable();
          phone_.add(index, builderForValue.build());
          onChanged();
        } else {
          phoneBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder addAllPhone(
          Iterable<? extends PhoneNumber> values) {
        if (phoneBuilder_ == null) {
          ensurePhoneIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, phone_);
          onChanged();
        } else {
          phoneBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder clearPhone() {
        if (phoneBuilder_ == null) {
          phone_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
          onChanged();
        } else {
          phoneBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public Builder removePhone(int index) {
        if (phoneBuilder_ == null) {
          ensurePhoneIsMutable();
          phone_.remove(index);
          onChanged();
        } else {
          phoneBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public ProtoDemo.Student.PhoneNumber.Builder getPhoneBuilder(
          int index) {
        return getPhoneFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public ProtoDemo.Student.PhoneNumberOrBuilder getPhoneOrBuilder(
          int index) {
        if (phoneBuilder_ == null) {
          return phone_.get(index);  } else {
          return phoneBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public java.util.List<? extends PhoneNumberOrBuilder>
           getPhoneOrBuilderList() {
        if (phoneBuilder_ != null) {
          return phoneBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(phone_);
        }
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public ProtoDemo.Student.PhoneNumber.Builder addPhoneBuilder() {
        return getPhoneFieldBuilder().addBuilder(
            ProtoDemo.Student.PhoneNumber.getDefaultInstance());
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public ProtoDemo.Student.PhoneNumber.Builder addPhoneBuilder(
          int index) {
        return getPhoneFieldBuilder().addBuilder(
            index, ProtoDemo.Student.PhoneNumber.getDefaultInstance());
      }
      /**
       * <pre>
       *集合
       * </pre>
       *
       * <code>repeated .Student.PhoneNumber phone = 5;</code>
       */
      public java.util.List<PhoneNumber.Builder>
           getPhoneBuilderList() {
        return getPhoneFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilderV3<
          PhoneNumber, PhoneNumber.Builder, PhoneNumberOrBuilder>
          getPhoneFieldBuilder() {
        if (phoneBuilder_ == null) {
          phoneBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
              PhoneNumber, PhoneNumber.Builder, PhoneNumberOrBuilder>(
                  phone_,
                  ((bitField0_ & 0x00000010) == 0x00000010),
                  getParentForChildren(),
                  isClean());
          phone_ = null;
        }
        return phoneBuilder_;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

      @Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:Student)
    }

    // @@protoc_insertion_point(class_scope:Student)
    private static final ProtoDemo.Student DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new ProtoDemo.Student();
    }

    public static ProtoDemo.Student getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Student>
        PARSER = new com.google.protobuf.AbstractParser<Student>() {
      @Override
      public Student parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Student(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Student> parser() {
      return PARSER;
    }

    @Override
    public com.google.protobuf.Parser<Student> getParserForType() {
      return PARSER;
    }

    @Override
    public ProtoDemo.Student getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Student_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Student_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_Student_PhoneNumber_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_Student_PhoneNumber_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    String[] descriptorData = {
      "\n\017ProtoDemo.proto\"\373\001\n\007Student\022\n\n\002id\030\001 \001(" +
      "\005\022\014\n\004name\030\002 \001(\t\022\r\n\005email\030\003 \001(\t\022\031\n\003sex\030\004 " +
      "\001(\0162\014.Student.Sex\022#\n\005phone\030\005 \003(\0132\024.Stude" +
      "nt.PhoneNumber\032?\n\013PhoneNumber\022\016\n\006number\030" +
      "\001 \001(\t\022 \n\004type\030\002 \001(\0162\022.Student.PhoneType\"" +
      "\031\n\003Sex\022\007\n\003MAN\020\000\022\t\n\005WOMAN\020\001\"+\n\tPhoneType\022" +
      "\n\n\006MOBILE\020\000\022\010\n\004HOME\020\001\022\010\n\004WORK\020\002B*\n\035cn.ab" +
      "eric.bother.entity.protoB\tProtoDemob\006pro" +
      "to3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
    internal_static_Student_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_Student_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Student_descriptor,
        new String[] { "Id", "Name", "Email", "Sex", "Phone", });
    internal_static_Student_PhoneNumber_descriptor =
      internal_static_Student_descriptor.getNestedTypes().get(0);
    internal_static_Student_PhoneNumber_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_Student_PhoneNumber_descriptor,
        new String[] { "Number", "Type", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
